#ifndef __UI_MANAGER_H__
#define __UI_MANAGER_H__

#include "input_dir.h"
#include "math.h"
#include <stdlib.h>
#include <string.h>


#define PRESSURE_TYPR_TOUCH 1
#define PRESSURE_TYPR_NET 2

#define STATE_TYPR_PRESSURE 1
#define STATE_TYPR_RELEASE 2

typedef struct Button_t {
	char * name;
	wchar_t button_str[20];
	int index;
	int iXLeft;
	int iYTop;
	int Width;
	int Height;
	int state;
	int if_pressure;	
	char * ctl_net_str;
	int (*Button_Pressure)(struct Button_t *pcur_btn,pInput_data pcur_input);
	int (*Button_Show)(struct Button_t *pcur_btn);
}Button_t,*pButton_t;

int Button_Init(pButton_t pcur_btn,int index,\
	int iXLeft,int iYTop,int Width,int Height,int if_pressure,wchar_t * btn_str,\
	int (*Button_Pressure)(struct Button_t *pcur_btn,pInput_data pcur_input),int (*Button_Show)(struct Button_t *pcur_btn));

typedef struct Page_t {
	char * name;
	int index;
	
	struct Page_t * next;
	
	int (*show)(int index);
	int (*get_current_show)(void);
	int (*close)(int index);
	int (*handle)(pInput_data pcur_in_data);
}Page_t,pPage_t;


int default_Button_Pressure(struct Button_t *pcur_btn,pInput_data pcur_input);
int default_Button_Show(struct Button_t *pcur_btn);
int Main_Show(int index);
int Main_handle(pInput_data pcur_in_data);
int get_btn_index(pInput_data pcur_in_data);

int Btn_Range(int * width,int * heigh,int btn_cnt);



#endif
